
<div class="row">


    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">
                <div class="ibox-title">
                    <span style="color:#c8e3ff;margin-top: -9px;" class="pull-right"> <i class="fa fa-users fa-fw fa-2x" ></i></span>
                    <h4>客户</h4>
                </div>
                <div class="ibox-content">

                    <div class="row">
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <span class="text-danger">
                                    <a href="facrm/customer/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('需跟进的客户')}">
                                    {$communicate|htmlentities}
                                    </a>
                                </span>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small> {:__('待跟进客户')}</small> </div>
                        </div>
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <span class="text-danger">
                                    <a href="facrm/customer/index?ref=addtabs&from_type=expire" class="btn-addtabs" title="{:__('将过期客户')}">
                                    {$lose_num|htmlentities}
                                    </a>
                                </span>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{:__('将过期客户')}</small>
                            </div>

                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">
                <div class="ibox-title">
                    <span style="color:#c8e3ff;margin-top: -9px;" class="pull-right"> <i class="fa fa-calendar fa-2x" ></i></span>
                    <h4>{:__('合同/回款')}</h4>
                </div>
                <div class="ibox-content">
					{php}
                    $contract_url="facrm/contract/index";
                    $return_url="facrm/contract/receivables/index";
                    if(!$auth->check('facrm/contract/index')){
                        $contract_url="facrm/contract/list";
                        $return_url="facrm/contract/receivables/lists";
                    }
                    {/php}
                    <div class="row">
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <a href="{$contract_url|htmlentities}?ref=addtabs&from_type=expire" class="btn-addtabs" title="{:__('将到期合同')}">
                                    <span class="text-danger"> {$contract_expire|htmlentities}</span>
                                </a>

                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{:__('将到期合同')}</small> </div>

                        </div>
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <a href="{$contract_url|htmlentities}?ref=addtabs&from_type=return" class="btn-addtabs" title="{:__('待回款合同')}">
                                    <span class="text-danger">{$contract_return|htmlentities}</span>
                                </a>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{:__('待回款合同')}</small>
                            </div>

                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>



    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">
                <div class="ibox-title">
                    <span style="color:#c8e3ff;margin-top: -9px;" class="pull-right"> <i class="fa fa-refresh fa-2x" ></i></span>
                    <h4>线索</h4>
                </div>
                <div class="ibox-content">
         
                    <div class="row">
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <span class="text-danger">
                                     <a href="facrm/clues/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('待跟进线索')}">
                                         {$clues_num|htmlentities}
                                     </a>
                                </span>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{:__('待跟进线索')}</small> </div>

                        </div>
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <a href="#" class="btn-addtabs" title="">
                                    <span class="text-danger"></span>
                                </a>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">

                                    <small></small>

                            </div>

                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    
	<div class="col-xs-6 col-sm-3">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">
                <div class="ibox-title">
                    <span style="color:#c8e3ff;margin-top: -9px;" class="pull-right">  <i class="fa fa-jpy fa-2x" ></i></span>
                    <h4>商机/计划回款</h4>
                </div>
                <div class="ibox-content">
         
                    <div class="row">
                        <div class="col-md-6">
                            <h3 class="no-margins " style="margin-top: 9px;">
                                <span class="text-danger">
                                     <a href="facrm/business/index?ref=addtabs&from_type=need" class="btn-addtabs" title="{:__('需跟进的商机')}">
                                         {$business|htmlentities}
                                     </a>
                                </span>
                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{:__('需跟进的商机')}</small> </div>

                        </div>
                        <div class="col-md-6">

                            <h3 class="no-margins " style="margin-top: 9px;">
                                <a {if $plan&&$plan['count']} href="facrm/contract/plan?ref=addtabs&plan_time={:datetime(time())}" class="btn-addtabs" {/if} title="{:__('计划回款提醒')}">
                                    <span class="text-danger">￥{$plan&&$plan['money']?$plan['money']:'0'}</span>
                                </a>

                            </h3>
                            <div style="color: rgb(153, 153, 153); font-size: 1.2rem;">
                                <small>{$plan?$plan['count']:'0'}(笔)计划回款提醒</small>
                            </div>


                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    
	

</div>


<div class="panel panel-default panel-intro">
 

    <div class="panel-heading">
        <span class="pull-right-container">
            <a class="label pull-right bg-purple "
            href='javascript:Layer.alert("<img src=\"{:url("facrm/common/qrcode")}?text={:url("facrm/third/connect","","",true)}\" style=\"max-height:250px;max-width:250px\"><p>请用微信扫描，如要登录请登录然后再扫。</p>");'>
                <i class="fa fa-qrcode fa-fw"></i>绑定公众号
            </a>
            </span>
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field1="scene_id">
            {foreach name="scene_list" item="vo"  index="i" }
            <li {if condition="$i eq 1"}class='active'{/if}><a  href="#t-{$key|htmlentities}" data-value="{$key|htmlentities}" data-toggle="tab">
            {$vo|htmlentities}<span class="pull-right-container {$key|htmlentities}"><small class="label pull-right bg-orange"></small></span>
            </a></li>

            {/foreach}
        </ul>

    </div>



    <div class="panel-body">

        <div class="widget-body no-padding">
            <div id="myTabContent" class="tab-content">
                    
                    {foreach name="scene_list" item="vo"  index="i" }
					
                    <div class="tab-pane fade  {if $i==1} active in{/if}" id="t-{$key|htmlentities}">
						<div id="toolbar{$i|htmlentities}" class="toolbar ">
							<a href="javascript:;" class="btn btn-primary btn-refresh" data-force-refresh='false'><i class="fa fa-refresh"></i></a>
						</div>
                        <table id="{$key|htmlentities}" class="table table-striped table-bordered table-hover  table-nowrap"
                               width="100%">
                        </table>
                    </div>
                    {/foreach}
            </div>
        </div>
    </div>
</div>
<style type="text/css">

    .orange {
        background: #fa8564 !important;
    }

    .tar {
        background: #45cf95 !important;
    }



    .pink {
        background: #AC75F0 !important;
    }

    .yellow-b {
        background: #fdd752 !important;
    }

    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color: #fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }

    .st-green {
        background-color: #27C24C;
    }

    .st-violet {
        background-color: #7266ba;
    }

    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float: left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat.lg .value {
        font-size: 26px;
        line-height: 28px;
    }

    .stat.lg .name {
        font-size: 16px;
    }

    .stat-col .progress {
        height: 2px;
    }

    .stat-col .progress-bar {
        line-height: 2px;
        height: 2px;
    }

    .item {
        padding: 30px 0;
    }



    #statistics .panel {
        min-height: 150px;
    }

    #statistics .panel h5 {
        font-size: 13px;
    }
    .invoice{
        position: unset;
        background: unset;
        border: unset;
        padding: unset;
        margin: unset;
    }
    .panel-intro{
        margin-bottom: 15px;
    }
</style>

<script>
    var scene_list={:json_encode($scene_list)};
</script>